﻿<%@ Page Language="C#" MasterPageFile="~/MuseumOwner.master" AutoEventWireup="true" CodeFile="AboutMuseum.aspx.cs"
    Inherits="AboutMuseum" Title="About Museum" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script language="javascript" type="text/javascript">
        function Validate() {
            if (document.getElementById("<%=txtMuseumName.ClientID%>").value == "") {
                alert("Museum Name can not be blank.");
                document.getElementById("<%=txtMuseumName.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtAddress.ClientID%>").value == "") {
                alert("Address can not be blank.");
                document.getElementById("<%=txtAddress.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtMuseumLink.ClientID%>").value == "") {
                alert("Museum Link can not be blank.");
                document.getElementById("<%=txtMuseumLink.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtDetails.ClientID%>").value == "") {
                alert("Details can not be blank.");
                document.getElementById("<%=txtDetails.ClientID%>").focus();
                return false;
            }
            
            return true;
        }
    </script>
    <table width="100%" cellspacing="3" cellpadding="1" border="0">
        <tr>
            <td colspan="3" align="center">
                <b style="font-size: x-large;">ABOUT MUSEUM</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblMuseumName" Text="Museum Name" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtMuseumName" runat="server" MaxLength="100" Width="200px"></asp:TextBox>
                &nbsp;<b style="color:red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblAddress" Text="Address" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtAddress" runat="server" MaxLength="255" TextMode="MultiLine"
                    Rows="4" Width="200px"></asp:TextBox>
                    &nbsp;<b style="color:red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblMuseumLink" Text="Museum Link" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtMuseumLink" runat="server" Width="200px"></asp:TextBox>
                &nbsp;<b style="color:red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblDetails" Text="Details" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtDetails" runat="server" MaxLength="255" TextMode="MultiLine"
                    Rows="4" Width="200px"></asp:TextBox>
                    &nbsp;<b style="color:red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblCountryName" Text="Country" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddlCountry" runat="server" Width="210px" DataTextField="CountryName" DataValueField="CountryId" Enabled="false"></asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblCity" Text="City" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddlCity" runat="server" Width="210px" DataTextField="CityName" DataValueField="CityId" Enabled="false"></asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Button ID="btnSubmit" Text="Submit" runat="server" OnClick="btnSubmit_Click" OnClientClick="return Validate();" />
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:Label ID="lblResult" runat="server" Visible="false" ForeColor="Red" />
            </td>
        </tr>
    </table>
</asp:Content>
